#include "../entities.hpp"


using lms::entities::User;


User::User()
{
     this->userName = "";
     this->password = "";
     this->fullName = "";
}

User::User(string userName, string password, string fullName)
{
     this->userName = userName;
     this->password = password;
     this->fullName = fullName;            
}

string User::getUserName()
{
     return userName;
}

string User::getPassword()
{
     return password;
}

string User::getFullName()
{
     return fullName;
}


void User::setUserName(string userName)
{
     this->userName = userName;
}

void User::setPassword(string password)
{
     this->password = password;
}

void User::setFullName(string fullName)
{
     this->fullName = fullName;
}

User::operator  serializable()
{
    User::serializable serial;   
    strcpy( serial.userName,this->userName.c_str() );
    strcpy( serial.password,this->password.c_str() );
    strcpy( serial.fullName,this->fullName.c_str() );
    
    return serial;
}

bool User::operator==( const User& user )
{
    return ( userName==user.userName && password==user.password );
}
